//
// Created by Administration on 2021/11/29.
//

#ifndef HELLO_MYQUEUE_H
#define HELLO_MYQUEUE_H
#include <stdint.h>

typedef struct _myQueue *myQueue;

struct _myQueue{
    uint8_t lock;
    int len;
    int capacity;
    int onesize;
    void **data;
    int (*SendToBackMyQueue)(myQueue q, void *data);
    int (*RevMyqueue)(myQueue q, void *data);
};



typedef struct{
    uint8_t *data;
    uint16_t len;
}CanMsg;

#define queueMalloc malloc
#define queueFree   free


myQueue CreateMyqueue(int cap, int onesize);
int DeleteMyQueue(myQueue q);
void queueTest(void);

#endif //HELLO_MYQUEUE_H
